﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using L = Science.Mathematics.LinearAlgebra;

namespace Strang3Ed.Chapter01.Section2
{
    public class ExampleA
    {
        public ExampleA()
        {
        }
        private string result;
        public string Result
        {
            get { return result; }
        }
        public void Compute()
        {
            L.Vector v = new L.Vector(2);
            v[0] = 3.0;
            v[1] = 4.0;

            L.Vector w = new L.Vector(2);
            w[0] = 4.0;
            w[1] = 3.0;

            result += (Math.Abs(v * w)).ToString() 
                 + " < " +(v.Length * w.Length).ToString()+"\r\n";
            result += ((v + w).Length).ToString() 
                 + " < "  + (v.Length + w.Length).ToString() + "\r\n";
            result += ((v * w)/ v.Length / w.Length).ToString() + "\r\n";
            result += (24.0 / 25.0).ToString() + "\r\n";
        }
    }
}
/*
24 < 25
9.89949493661167 < 10
0.96
0.96
*/

